package net.openl10n.api.document;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import net.openl10n.api.Namespaces;

@XmlRootElement(name="document", namespace=Namespaces.DOCUMENT)
public class DocumentRef extends Document{

	private String relationshipId;

	public DocumentRef() {
	}

	public DocumentRef(String fullPath, String contentType, String relId){
		super(fullPath, contentType);
		this.relationshipId = relId;
	}
	
	public DocumentRef(String fullPath, String contentType, Integer version, String relId){
		super(fullPath, contentType, version);
		this.relationshipId = relId;
	}	
	
	public DocumentRef(String fullPath, String contentType, Integer version, String lang, String relId){
		super(fullPath, contentType, version, lang);
		this.relationshipId = relId;
	}	

	public DocumentRef(String id, String name, String path, String contentType, String relId) {
		super(id, name, path, contentType);
		this.relationshipId = relId;
	}

	public DocumentRef(String id, String name, String path, String contentType, Integer version, String relId) {
		super(id, name, path, contentType, version);
		this.relationshipId = relId;
	}
	
	public DocumentRef(String id, String name, String path, String contentType, Integer version, String lang, String relId) {
		super(id, name, path, contentType, version, lang);
		this.relationshipId = relId;
	}

	@XmlAttribute(name= "id", namespace=Namespaces.OPC_RELATIONSHIPS ,required=true)
	public String getRelationshipId() {
		return relationshipId;
	}
	
	public void setRelationshipId(String relationshipId) {
		this.relationshipId = relationshipId;
	}
}
